package task16;

import java.util.Scanner;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/13 10:13
 * @description:
 */
public class PrinterTest {

  public static void main(String[] args) {
    System.out.println("请输入，０表示ｈｐ，１表示ｃａｎ");
    Scanner scanner = new Scanner(System.in);
    //输入值多少确定打印机
    int a = scanner.nextInt();
    PrinterFactory pf = new PrinterFactory();
    Printer printer = pf.getPrinter(a);
    printer.open();
    printer.close();
    printer.print();
  }
  private static void getPrinter(int a){

  }


    //if(a==0){
    //  HPrinter hPrinter=new HPrinter();
    //  hPrinter.open();
    //  hPrinter.print();
    //  hPrinter.close();
    //}else if(a==1){
    //  CPrinter cPrinter=new CPrinter();
    //  cPrinter.open();
    //  cPrinter.print();
    //  cPrinter.clean();
    //}else{
    //  System.out.println("输入有误");
    //}


}
